package org.webdb.service.impl;

import org.webdb.core.Document;
import org.webdb.core.DocumentRecord;
import org.webdb.core.database.DataBase;
import org.webdb.core.database.Record;
import org.webdb.service.PostDocumentService;

public class PostDocumentServiceImpl implements PostDocumentService {

    @Override
    public DocumentRecord createRecord(DataBase database, String clusterName,
            String documentName, Record record) {

        Document document = database.getDocument(clusterName, documentName);
        return document.save(record);
    }

    @Override
    public DocumentRecord createRecord(DataBase database, String documentName,
            Record record) {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException();
    }

}
